'use strict';

const Controller = require('egg').Controller;

const axios  = require('axios');

class AddressController extends Controller {
    //添加
    async create() {
        this.ctx.body = "创建"
    }

    //修改

    async update(){
        this.ctx.body = "修改"
    }

    //销毁
    async destroy(){
        this.ctx.body = "销毁s"
    }

    //查询

    async index(){
        // let list = await axios.get('https://baojia.chelun.com/v2-car-getMasterBrandList.html');

        // console.log(list.data.data)

        let {ctx,service} = this;

        let list = await service.address.getAddress();
        ctx.body = list
    }

    //查询指定的信息
    async show(){
        this.ctx.body = '详情'
    }
}


module.exports = AddressController;
